---
title: "unkey-go"
description: "Unkey's API provides programmatic access for all resources within our platform."
---

## SDK Installation

To add the SDK as a dependency to your project:

```bash
go get github.com/unkeyed/sdks/api/go/v2@latest
```

## SDK Example Usage

### Example

```go
package main

import (
	"context"
	unkey "github.com/unkeyed/sdks/api/go/v2"
	"github.com/unkeyed/sdks/api/go/v2/models/components"
	"log"
	"os"
)

func main() {
	ctx := context.Background()

	s := unkey.New(
		unkey.WithSecurity(os.Getenv("UNKEY_ROOT_KEY")),
	)

	res, err := s.Apis.CreateAPI(ctx, components.V2ApisCreateAPIRequestBody{
		Name: "payment-service-production",
	})
	if err != nil {
		log.Fatal(err)
	}
	if res.V2ApisCreateAPIResponseBody != nil {
		// handle response
	}
}

```

## Repository

{" "}
<Card
  title="GitHub"
  icon="github"
  href="https://github.com/unkeyed/sdks/blob/main/api/go/README.md"
  cta="README"
>
  The full autogenerated documentation can be found on GitHub.
</Card>
